<?php

class Application_Model_LibraryAd extends Zend_Acl {

    function __construct() {
        //controller
        $this->add(new Zend_Acl_Resource('authentication'));
        $this->add(new Zend_Acl_Resource('error'));
        $this->add(new Zend_Acl_Resource('frais-forfait'));
        $this->add(new Zend_Acl_Resource('index'));
        $this->add(new Zend_Acl_Resource('stats'));
        $this->add(new Zend_Acl_Resource('visiteur'));

        //role
        $this->addRole(new Zend_Acl_Role('user'));
        $this->addRole(new Zend_Acl_Role('admin'), 'user');

        //permision
        
        $this->allow('user', 'index');
        $this->allow('user', 'authentication');
        $this->allow('user', 'visiteur', 'lister');
        $this->allow('user', 'frais-forfait', 'lister');
        
        $this->allow('admin', 'visiteur');
        $this->allow('admin', 'frais-forfait');
        $this->allow('admin', 'stats');
    }

}
